package com.zhihuitong.meeting.splash;

import android.widget.ImageView;
import android.widget.TextView;

import com.zhihuitong.meeting.R;
import com.zhihuitong.meeting.base.BaseActivity;
import com.zhihuitong.meeting.login.LoginActivity;
import com.zhihuitong.meeting.meeting.list.MainActivity;

import butterknife.BindView;

/**
 * 作者：guoyuan
 * 时间: 2020/2/22.
 * 文件描述：应用启动开屏页面
 * 版本号：V 1.0
 **/
public class SplashActivity extends BaseActivity {

    @BindView(R.id.iv_logo)
    ImageView mIvLogo;
    @BindView(R.id.launcher_loading)
    TextView mLauncherLoading;


    /**
     * 返回子类布局id
     *
     * @return
     */
    @Override
    protected int getLayoutId() {
        return R.layout.activity_splash;
    }

    /**
     * 初始化數據
     */
    @Override
    protected void initData() {

    }

    /**
     * 初始化View
     */
    @Override
    protected void initView() {
        toLogin();
    }


    /**
     * 进入主页
     */
    private void toMain() {
        MainActivity.start(mContext);
        finish();
    }


    /**
     * 进去登陆页面
     */
    private void toLogin() {
        mIvLogo.postDelayed(new Runnable() {
            @Override
            public void run() {
                LoginActivity.start(mContext);
                finish();
            }
        }, 500);

    }
}
